package com.ysd.lis.controller.emr;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.request.emr.EmrParam;
import com.ysd.lis.service.emr.EmrItemStandardTaskFileService;
import com.ysd.lis.service.emr.EmrItemStandardTaskFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;

/**
 * <p>
 * cold_chain.sys_module 前端控制器
 * </p>
 *
 * @author prs
 * @since 2025-06-07
 */
@Api(tags = "标准模型")
@RestController
@RequestMapping("/lis/emr/itemStandardTaskFile")
public class EmrItemStandardTaskFileController extends BaseController {
    @Autowired
    private EmrItemStandardTaskFileService emrItemStandardTaskFileService;
    @PostMapping("/saveFile")
    public Map<String, Integer> saveFile(HttpServletRequest request) throws IOException {

      return   emrItemStandardTaskFileService.saveFile(request);

    }

    @ApiOperation("获取文件")
    @GetMapping("/findItemStandardTaskFileList")
    public Result findItemStandardTaskFileList(EmrParam rptResultDto) {
        return emrItemStandardTaskFileService.findItemStandardTaskFileList(rptResultDto);
    }
}
